package net.alche.sdd.fatis;

import java.util.Date;

import net.alche.al.util.AC;

public class SddFatisPrepared {
  public Object val;
  public String type;

  public SddFatisPrepared() {

  }

  public SddFatisPrepared(Object obj) {
    val = obj;
  }

  public String getLogStr() {
    if (val == null) {
      return "null";
    }
    if (val instanceof String) {
      return "'" + (String) (val) + "'";
    }
    if (val instanceof Date dt) {
      return "'" + AC.date.fmtDatetime(dt) + "'";
    }
    return val.toString();
  }
}
